package com.hdaccp.foodsales.service.impl;

import com.hdaccp.foodsales.dao.MembersDao;
import com.hdaccp.foodsales.entity.members;
import com.hdaccp.foodsales.service.MembersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MembersServiceImpl implements MembersService {

@Autowired
private MembersDao MembersDao;



    @Override
    public long findTotalCount(String membersname) {
        return MembersDao.getTotalCount(membersname);
    }

    @Override
    public List<members> findAll(String membersname, int offset, int limit) {
        return MembersDao.query(membersname,offset,limit);
    }

    @Override
    public List<members> user(String membersname, int offset, int limit) {
        return MembersDao.uery(membersname,offset,limit);
    }

    @Override
    public int dele(int membersid) {
        return MembersDao.del(membersid);
    }

    @Override
    public members getById(int membersid) {
        return MembersDao.getId(membersid);
    }

    @Override
    public int update(members membersinfo) {
        return MembersDao.update(membersinfo);
    }

    @Override
    public int zj(members membersinfo) {
        return MembersDao.add(membersinfo);
    }


}
